Add bar-aligned silence padding to Octatrack tracks on sync#10
Merged
Conversation
676c48a to
ac6535b
Compare
Adds a -p / --pad flag to `wavesync sync` that pads each track with silence so its total length aligns to a multiple of 64 bars (Octatrack only, requires BPM metadata). Re-converts existing files when the expected duration changes. Lazy-evaluates BPM in Audio so TagLib is opened at most once per instance. https://claude.ai/code/session_01Qwfs9ncsZr2xiKxthYeAQU
ac6535b to
9151c5a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When syncing to the Octatrack, append silence to the end of each track so
that total duration (track + padding) equals a whole multiple of 64 bars.
64 is the Octatrack's maximum slice count, so this guarantees each slice
lands on a bar boundary regardless of how the operator divides the sample.
bar_multiple: 64to the Octatrack devicebar_multipleattribute loaded from configbar_multiple using 4/4 time (seconds_per_bar = 240 / bpm)
padding_seconds:and apply FFmpegapadfilter (
apad=whole_dur=<total>) when padding is neededpadding_seconds:through to transcode;treat non-zero padding as a reason to transcode even without a format
conversion
route through the converter whenever padding is required